package com.neusoft.tyut.bu;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.ToString;

@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Dept {
    private Integer deptno;
    private String dname;
    private  String loc;

    public static void main(String[] args) {
        DeptBuilder builder = Dept.builder();
        builder = builder.deptno(10);
        builder =  builder.dname("研发部");
        builder =  builder.loc("太理科技楼");
        Dept dept = builder.build();
        System.out.println(dept);


//        Dept dept = Dept.builder()
//                .deptno(10)
//                .dname("研发部")
//                .loc("太理科技楼")
//                .build();
//        Dept dept = new Dept(10, "研发部", "太理科技楼"); //
//        System.out.println(dept.toString()
//        );
    }

}
